package jpa.entitys.promis.sales;

import java.io.Serializable;

import javax.persistence.*;

import java.math.BigDecimal;
import java.util.Date;

import jpa.entitys.common.CommonEntity;


/**
 * The persistent class for the MKT_REQUEST_DTL_ADJUSTMENTS database table.
 * 
 */
@Entity
@Table(name="MKT_REQUEST_DTL_ADJUSTMENTS")
@NamedQueries({
    @NamedQuery(name = "MktRequestDtlAdjustment.findAll", query = " SELECT c FROM MktRequestDtlAdjustment c "),
    @NamedQuery(name = "MktRequestDtlAdjustment.findById", query = " SELECT c FROM MktRequestDtlAdjustment c WHERE c.id = :Id "),
    @NamedQuery(name = "MktRequestDtlAdjustment.findByStatus", query = " SELECT c FROM MktRequestDtlAdjustment c WHERE c.syncIsstaging = 'N'"),
    @NamedQuery(name = "MktRequestDtlAdjustment.findOldUnit", query = " SELECT c FROM MktRequestDtlAdjustment c WHERE c.id.company = :company And c.id.project = :project And c.id.receiptType = :receiptType And c.id.receiptSeries = :receiptSeries And c.id.receiptNumber = :receiptNumber And c.id.paymentRefType = :paymentRefType And c.id.paymentRefSeries = :paymentRefSeries And c.id.paymentRefNumber = :paymentRefNumber And c.buildingPhaseCode = :buildingPhaseCode And c.floorZoneCode = :floorZoneCode And c.unitNumber = :unitNumber And c.status =:status"),
    @NamedQuery(name = "MktRequestDtlAdjustment.findOldUnitByCN", query = " SELECT c FROM MktRequestDtlAdjustment c WHERE c.id.company = :company And c.id.project = :project And c.id.receiptType = :receiptType And c.id.receiptSeries = :receiptSeries And c.id.receiptNumber = :receiptNumber And c.id.paymentRefType = :paymentRefType And c.id.paymentRefSeries = :paymentRefSeries And c.id.paymentRefNumber = :paymentRefNumber And c.status =:status")
})
public class MktRequestDtlAdjustment extends CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

//	  COMPANY
//    PROJECT
//    RECEIPT_TYPE
//    RECEIPT_SERIES
//    RECEIPT_NUMBER
//    PAYMENT_REF_TYPE
//    PAYMENT_REF_SERIES
//    PAYMENT_REF_NUMBER
//    BUILDING_PHASE_CODE
//    FLOOR_ZONE_CODE
//    UNIT_NUMBER

	@EmbeddedId
	private MktRequestDtlAdjustmentPK id;
	
	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}

	@Column(name="BOOKING_NUMBER")
	private BigDecimal bookingNumber;

	@Column(name="BOOKING_SERIES")
	private String bookingSeries;

	@Column(name="BUILDING_PHASE_CODE")
	private String buildingPhaseCode;

	@Column(name="CREATED_BY")
	private String createdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="CREATED_ON")
	private Date createdOn;

	@Column(name="CUSTOMER_CODE")
	private String customerCode;

	@Column(name="CUSTOMER_NAME")
	private String customerName;

	@Column(name="DOCUMENT_TYPE")
	private String documentType;

	@Column(name="EXT_REF_KEY")
	private String extRefKey;

	@Column(name="EXT_REF_NO")
	private String extRefNo;

	@Column(name="FLOOR_ZONE_CODE")
	private String floorZoneCode;

	@Column(name="INSTANCE_NO")
	private String instanceNo;

	private String issync;

	@Column(name="LAST_UPD_BY")
	private String lastUpdBy;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="LAST_UPD_ON")
	private Date lastUpdOn;

	@Column(name="MSG_ACT_RESULT")
	private String msgActResult;

	@Column(name="MSG_ALT_DESC")
	private String msgAltDesc;

	@Column(name="MSG_CODE")
	private String msgCode;

	@Column(name="MSG_DESC")
	private String msgDesc;

	@Column(name="PROPERTY_TYPE_CODE")
	private String propertyTypeCode;

	private String remarks;

	private String status;

	@Column(name="SYNC_CREATEDBY")
	private String syncCreatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="SYNC_ISSTAGING")
	private String syncIsstaging;

	@Column(name="SYNC_PK_ID")
	private String syncPkId;

	@Column(name="SYNC_UPDATEDBY")
	private String syncUpdatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	@Column(name="TO_BUILDING_PHASE_CODE")
	private String toBuildingPhaseCode;

	@Column(name="TO_FLOOR_ZONE_CODE")
	private String toFloorZoneCode;

	@Column(name="TO_PROJECT")
	private String toProject;

	@Column(name="TO_UNIT_NUMBER")
	private String toUnitNumber;

	@Column(name="TOTAL_ADJUSTED")
	private BigDecimal totalAdjusted;

	@Column(name="TOTAL_CHARGE")
	private BigDecimal totalCharge;

	@Column(name="TOTAL_REFUND")
	private BigDecimal totalRefund;

	@Column(name="UNIT_NUMBER")
	private String unitNumber;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="VOUCHER_DATE")
	private Date voucherDate;

    public MktRequestDtlAdjustment() {
    }

	public MktRequestDtlAdjustmentPK getId() {
		return this.id;
	}

	public void setId(MktRequestDtlAdjustmentPK id) {
		this.id = id;
	}
	
	public BigDecimal getBookingNumber() {
		return this.bookingNumber;
	}

	public void setBookingNumber(BigDecimal bookingNumber) {
		this.bookingNumber = bookingNumber;
	}

	public String getBookingSeries() {
		return this.bookingSeries;
	}

	public void setBookingSeries(String bookingSeries) {
		this.bookingSeries = bookingSeries;
	}

	public String getBuildingPhaseCode() {
		return this.buildingPhaseCode;
	}

	public void setBuildingPhaseCode(String buildingPhaseCode) {
		this.buildingPhaseCode = buildingPhaseCode;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public String getCustomerCode() {
		return this.customerCode;
	}

	public void setCustomerCode(String customerCode) {
		this.customerCode = customerCode;
	}

	public String getCustomerName() {
		return this.customerName;
	}

	public void setCustomerName(String customerName) {
		this.customerName = customerName;
	}

	public String getDocumentType() {
		return this.documentType;
	}

	public void setDocumentType(String documentType) {
		this.documentType = documentType;
	}

	public String getExtRefKey() {
		return this.extRefKey;
	}

	public void setExtRefKey(String extRefKey) {
		this.extRefKey = extRefKey;
	}

	public String getExtRefNo() {
		return this.extRefNo;
	}

	public void setExtRefNo(String extRefNo) {
		this.extRefNo = extRefNo;
	}

	public String getFloorZoneCode() {
		return this.floorZoneCode;
	}

	public void setFloorZoneCode(String floorZoneCode) {
		this.floorZoneCode = floorZoneCode;
	}

	public String getInstanceNo() {
		return this.instanceNo;
	}

	public void setInstanceNo(String instanceNo) {
		this.instanceNo = instanceNo;
	}

	public String getIssync() {
		return this.issync;
	}

	public void setIssync(String issync) {
		this.issync = issync;
	}

	public String getLastUpdBy() {
		return this.lastUpdBy;
	}

	public void setLastUpdBy(String lastUpdBy) {
		this.lastUpdBy = lastUpdBy;
	}

	public Date getLastUpdOn() {
		return this.lastUpdOn;
	}

	public void setLastUpdOn(Date lastUpdOn) {
		this.lastUpdOn = lastUpdOn;
	}

	public String getMsgActResult() {
		return this.msgActResult;
	}

	public void setMsgActResult(String msgActResult) {
		this.msgActResult = msgActResult;
	}

	public String getMsgAltDesc() {
		return this.msgAltDesc;
	}

	public void setMsgAltDesc(String msgAltDesc) {
		this.msgAltDesc = msgAltDesc;
	}

	public String getMsgCode() {
		return this.msgCode;
	}

	public void setMsgCode(String msgCode) {
		this.msgCode = msgCode;
	}

	public String getMsgDesc() {
		return this.msgDesc;
	}

	public void setMsgDesc(String msgDesc) {
		this.msgDesc = msgDesc;
	}

	public String getPropertyTypeCode() {
		return this.propertyTypeCode;
	}

	public void setPropertyTypeCode(String propertyTypeCode) {
		this.propertyTypeCode = propertyTypeCode;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncIsstaging() {
		return this.syncIsstaging;
	}

	public void setSyncIsstaging(String syncIsstaging) {
		this.syncIsstaging = syncIsstaging;
	}

	public String getSyncPkId() {
		return this.syncPkId;
	}

	public void setSyncPkId(String syncPkId) {
		this.syncPkId = syncPkId;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public String getToBuildingPhaseCode() {
		return this.toBuildingPhaseCode;
	}

	public void setToBuildingPhaseCode(String toBuildingPhaseCode) {
		this.toBuildingPhaseCode = toBuildingPhaseCode;
	}

	public String getToFloorZoneCode() {
		return this.toFloorZoneCode;
	}

	public void setToFloorZoneCode(String toFloorZoneCode) {
		this.toFloorZoneCode = toFloorZoneCode;
	}

	public String getToProject() {
		return this.toProject;
	}

	public void setToProject(String toProject) {
		this.toProject = toProject;
	}

	public String getToUnitNumber() {
		return this.toUnitNumber;
	}

	public void setToUnitNumber(String toUnitNumber) {
		this.toUnitNumber = toUnitNumber;
	}

	public BigDecimal getTotalAdjusted() {
		return this.totalAdjusted;
	}

	public void setTotalAdjusted(BigDecimal totalAdjusted) {
		this.totalAdjusted = totalAdjusted;
	}

	public BigDecimal getTotalCharge() {
		return this.totalCharge;
	}

	public void setTotalCharge(BigDecimal totalCharge) {
		this.totalCharge = totalCharge;
	}

	public BigDecimal getTotalRefund() {
		return this.totalRefund;
	}

	public void setTotalRefund(BigDecimal totalRefund) {
		this.totalRefund = totalRefund;
	}

	public String getUnitNumber() {
		return this.unitNumber;
	}

	public void setUnitNumber(String unitNumber) {
		this.unitNumber = unitNumber;
	}

	public Date getVoucherDate() {
		return this.voucherDate;
	}

	public void setVoucherDate(Date voucherDate) {
		this.voucherDate = voucherDate;
	}

}